# of course, a hello world must be

"Hello World!" print

# Vehicle is not a class. It is an object. We can then send
# it messages to define its state and behavior.

Vehicle := Object clone

# Now define members, by defining a new slot `description`:

Vehicle description := "device that serves as means of transportation"
Vehicle

# ==>  Vehicle_0x21cd6c0:
#   description      = "device that serves as means of transportation"
#   type             = "Vehicle"

# `:=` creates a new slot.
# `=` sets a new value to a slot. (`updateSlot`)

Vehicle description = "this should work"
Vehicle not_yet_defined = "this should not work"

# Get values like this:

Vehicle description

# Introspection:

Vehicle slotNames

# Every object supports type:

Vehicle type
Object type

# Inheritance via cloning other objects:

Car := Vehicle clone
Car slotNames
# Yet we can still send it the message `description`:
Car description
# It is proxied to the Vehicle object.
# -> If we change the value at the Vehicle, it should be
# changed for Car as well.
Vehicle description = "Yet another description"
Car description


ferrari := Car clone
ferrari slotNames
# no type slot, because lowercased name.
# Types begin with uppercase letter in Io.
# Instances begin with lowercase letter.
# Calls to `type` slot on instances invoke parent `type` slot:
ferrari type
